<!DOCTYPE html>
<html lang="en">
	<head>
		<title> New Document </title>
		<meta charset="utf-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Bootstrap -->
		<link href="${webRoot}resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link href="${webRoot}resources/css/style.css" rel="stylesheet">
	</head>
<body class="main">
	<div class="wrap">
		<form class="form-horizontal" method="post"
			enctype="multipart/form-data"
			action="${webRoot}pic/addPicInfo.do" id="goodsInfo">
		  <div class="control-group">
		   <ul class="breadcrumb">
		    <li><span id="test">您当前的位置：</span><a href="#">首页</a> <span class="divider">>></span></li>
		    <li class="active">${addPic}</li>
	     </ul>
		  </div>
		  <input type="hidden" id="goods_id" name="goods_id" value="${goods_id}"/>
		  <div class="control-group">
		    <label class="control-label" for="cirl_context">商铺名字</label>
		    <div class="controls">
		      <input type="text" id="goodsname" name="goodsname" value="${goods_name}" disabled="disabled"/>
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" for="pic_desc">简介</label>
		    <div class="controls">
		      <textarea rows="3" id="pic_desc" name="pic_desc"></textarea>
		    </div>
		  </div>
		   <div class="control-group">
				<label class="control-label" for="file">图片上传</label>
				<div class="controls">
					<input type="file" id="file" name="file">
					<div class="preview">
						<img src="">
					</div>
				</div>
			</div>  
		  <div class="control-group">
		    <div class="controls">
		      <button type="button" class="btn" id="insertTo" onclick="sendValue();">确定添加</button>
		    </div>
		  </div>
		</form>		
	</div>			
	<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
	<script src="${webRoot}resources/js/bootstrap.min.js"></script>
	<script src="${webRoot}resources/js/js.js"></script>
	<script type="text/javascript">
		function sendValue(){
			var username =$("#pic_desc").val();
			if($.trim(username) == null ||$.trim(username) =="" ){
				alert("简介不能为空！");
				return ;
			}
			document.getElementById("goodsInfo").submit();
		}
		</script>
</body>
</html>
